﻿@model System.Collections.Generic.IEnumerable<HxBlogs.Model.BlogTag>
@{
    int i = 0;
}
<div class="card-header hx-card-header">
    随笔分类
</div>
<div class="card-body hx-card-body">
    <div class="d-flex flex-column justify-content-start">
        @if (Model != null)
        {
            foreach (HxBlogs.Model.BlogTag tag in Model)
            {
                i++;
                <a class="hx-content-nowrap @(i!=1?"mt-1":"") @(i>4? "collapse hx-collapsed" : "")" target="_blank" href="@(WebHelper.GetFullUrl("/article/"+ViewBag.UserName+"/tag/" + tag.HexId))">
                    <span>@tag.Name</span>
                    <span>(@ViewBag.TagCountList[tag.Id]篇)</span>
                </a>
            }

        }
    </div>
</div>
@if (i > 5)
{
    <div class="card-footer hx-card-footer hx-card-footer-link">
        <a class="collapsed" data-toggle="collapse"  data-target=".hx-collapsed">展开</a>
    </div>
}

